package com.mapper;

import com.pojo.HuiFu_db;
import org.apache.ibatis.annotations.*;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@Mapper
public interface HuiFuMapper_db {
    List<HuiFu_db> list(@Param("stime") String stime,@Param("etime") String etime,@Param("id") Integer id);

    @Select("select * from huifu_db")
    List<HuiFu_db> listAll();

    @Select("select * from huifu_db where h_jid = #{jId}")
    List<HuiFu_db> listById(Integer jId);

    @Insert("insert into huifu_db(h_name,h_level,h_text,h_time,h_jid) values (#{hName},#{hLevel},#{hText},#{hTime},#{hJid})")
    Integer add(HuiFu_db huiFuDb);

    @Update("update huifu_db set h_name = #{hName},h_level = #{hLevel},h_text = #{hText},h_time = #{hTime},h_jid = #{hJid} where h_id = #{hId}")
    Integer update(HuiFu_db huiFuDb);

    @Delete("delete from huifu_db where h_id = #{hId}")
    Integer del(Integer hId);
}

